Integrand size = 28, antiderivative size = 104 \[ \int \frac {\sqrt {a+a \sec (e+f x)}}{(c-c \sec (e+f x))^2} \, dx=\frac {2 \sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c^2 f}+\frac {2 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c^2 f}-\frac {2 \cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{3 a c^2 f} \]
-2/3*cot(f*x+e)^3*(a+a*sec(f*x+e))^(3/2)/a/c^2/f+2*arctan(a^(1/2)*tan(f*x+ e)/(a+a*sec(f*x+e))^(1/2))*a^(1/2)/c^2/f+2*cot(f*x+e)*(a+a*sec(f*x+e))^(1/ 2)/c^2/f
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.52 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.57 \[ \int \frac {\sqrt {a+a \sec (e+f x)}}{(c-c \sec (e+f x))^2} \, dx=-\frac {2 a \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},1-\sec (e+f x)\right ) \tan (e+f x)}{3 f \sqrt {a (1+\sec (e+f x))} (c-c \sec (e+f x))^2} \]
(-2*a*Hypergeometric2F1[-3/2, 1, -1/2, 1 - Sec[e + f*x]]*Tan[e + f*x])/(3* f*Sqrt[a*(1 + Sec[e + f*x])]*(c - c*Sec[e + f*x])^2)
Time = 0.38 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.92, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 4392, 3042, 4375, 264, 264, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {a \sec (e+f x)+a}}{(c-c \sec (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a \csc \left (e+f x+\frac {\pi }{2}\right )+a}}{\left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4392 |
\(\displaystyle \frac {\int \cot ^4(e+f x) (\sec (e+f x) a+a)^{5/2}dx}{a^2 c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{5/2}}{\cot \left (e+f x+\frac {\pi }{2}\right )^4}dx}{a^2 c^2}\) |
\(\Big \downarrow \) 4375 |
\(\displaystyle -\frac {2 \int \frac {\cot ^4(e+f x) (\sec (e+f x) a+a)^2}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{a c^2 f}\) |
\(\Big \downarrow \) 264 |
\(\displaystyle -\frac {2 \left (\frac {1}{3} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-a \int \frac {\cot ^2(e+f x) (\sec (e+f x) a+a)}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )}{a c^2 f}\) |
\(\Big \downarrow \) 264 |
\(\displaystyle -\frac {2 \left (\frac {1}{3} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-a \left (\cot (e+f x) \sqrt {a \sec (e+f x)+a}-a \int \frac {1}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )\right )}{a c^2 f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle -\frac {2 \left (\frac {1}{3} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-a \left (\sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )+\cot (e+f x) \sqrt {a \sec (e+f x)+a}\right )\right )}{a c^2 f}\) |
(-2*((Cot[e + f*x]^3*(a + a*Sec[e + f*x])^(3/2))/3 - a*(Sqrt[a]*ArcTan[(Sq rt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]] + Cot[e + f*x]*Sqrt[a + a*Se c[e + f*x]])))/(a*c^2*f)
3.1.47.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(c*x)^( m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] - Simp[b*((m + 2*p + 3)/(a*c ^2*(m + 1))) Int[(c*x)^(m + 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, p }, x] && LtQ[m, -1] && IntBinomialQ[a, b, c, 2, m, p, x]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d) Subst[Int[x^m*((2 + a*x^2 )^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] ]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I ntegerQ[n - 1/2]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m Int[Cot[e + f*x]^(2*m)*( c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] && !( IntegerQ[n] && GtQ[m - n, 0])
Time = 2.23 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.73
method | result | size |
default | \(\frac {2 \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )-3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+4 \cos \left (f x +e \right ) \cot \left (f x +e \right )-3 \cot \left (f x +e \right )\right )}{3 c^{2} f \left (\cos \left (f x +e \right )-1\right )}\) | \(180\) |
2/3/c^2/f*(a*(sec(f*x+e)+1))^(1/2)/(cos(f*x+e)-1)*(3*arctanh(sin(f*x+e)/(c os(f*x+e)+1)/(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+ 1))^(1/2)*cos(f*x+e)-3*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-cos(f*x+e)/(cos (f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)+4*cos(f*x+e)*cot(f*x +e)-3*cot(f*x+e))
Time = 0.30 (sec) , antiderivative size = 339, normalized size of antiderivative = 3.26 \[ \int \frac {\sqrt {a+a \sec (e+f x)}}{(c-c \sec (e+f x))^2} \, dx=\left [\frac {3 \, \sqrt {-a} {\left (\cos \left (f x + e\right ) - 1\right )} \log \left (-\frac {8 \, a \cos \left (f x + e\right )^{3} - 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 4 \, {\left (4 \, \cos \left (f x + e\right )^{2} - 3 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{6 \, {\left (c^{2} f \cos \left (f x + e\right ) - c^{2} f\right )} \sin \left (f x + e\right )}, \frac {3 \, \sqrt {a} {\left (\cos \left (f x + e\right ) - 1\right )} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \, {\left (4 \, \cos \left (f x + e\right )^{2} - 3 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{3 \, {\left (c^{2} f \cos \left (f x + e\right ) - c^{2} f\right )} \sin \left (f x + e\right )}\right ] \]
[1/6*(3*sqrt(-a)*(cos(f*x + e) - 1)*log(-(8*a*cos(f*x + e)^3 - 4*(2*cos(f* x + e)^2 - cos(f*x + e))*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))* sin(f*x + e) - 7*a*cos(f*x + e) + a)/(cos(f*x + e) + 1))*sin(f*x + e) + 4* (4*cos(f*x + e)^2 - 3*cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e) ))/((c^2*f*cos(f*x + e) - c^2*f)*sin(f*x + e)), 1/3*(3*sqrt(a)*(cos(f*x + e) - 1)*arctan(2*sqrt(a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e)/(2*a*cos(f*x + e)^2 + a*cos(f*x + e) - a))*sin(f*x + e) + 2*(4*cos(f*x + e)^2 - 3*cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e)))/((c^2*f*cos(f*x + e) - c^2*f)*sin(f*x + e))]
\[ \int \frac {\sqrt {a+a \sec (e+f x)}}{(c-c \sec (e+f x))^2} \, dx=\frac {\int \frac {\sqrt {a \sec {\left (e + f x \right )} + a}}{\sec ^{2}{\left (e + f x \right )} - 2 \sec {\left (e + f x \right )} + 1}\, dx}{c^{2}} \]
\[ \int \frac {\sqrt {a+a \sec (e+f x)}}{(c-c \sec (e+f x))^2} \, dx=\int { \frac {\sqrt {a \sec \left (f x + e\right ) + a}}{{\left (c \sec \left (f x + e\right ) - c\right )}^{2}} \,d x } \]
\[ \int \frac {\sqrt {a+a \sec (e+f x)}}{(c-c \sec (e+f x))^2} \, dx=\int { \frac {\sqrt {a \sec \left (f x + e\right ) + a}}{{\left (c \sec \left (f x + e\right ) - c\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {\sqrt {a+a \sec (e+f x)}}{(c-c \sec (e+f x))^2} \, dx=\int \frac {\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}}{{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \]